<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Developers.aspx.cs" Inherits="Ogdi.InteractiveSdk.WebForms.Forms.TutorialForm"
    MasterPageFile="~/InteractiveSdk.Master" EnableViewState="False" %>

<asp:Content ID="content" ContentPlaceHolderID="contentPlaceholder" runat="server">
    <h1>
        For Developers</h1>
    <br />
    <h3>
        The Windows Azure Platform</h3>
    <p class="big">
        The OGDI is based on Microsoft's Windows Azure Platform,
        a cloud-computing platform that helps developers quickly
        and easily create, deploy, manage, and run Web applications and services at Internet
        scale. To learn more please visit the <a href="http://www.windowsazure.com"
            target="_blank">Windows Azure Platform</a><%-- Section 508 - Added alternate and descriptive text for image--%><img
                src="/images/ExternalLink.png" alt="External Link for Azure Services Platform home page" longdesc="desc/Home.txt" /> home page.
    </p>
    <h3>
        Querying OGDI</h3>
    <p class="big">
        OGDI exposes data through <%-- Section 508 - Added target attribute for the anchor--%><a href="http://en.wikipedia.org/wiki/Representational_State_Transfer" target="_blank">
            REST</a><%-- Section 508 - Added alternate and descriptive text for image--%><img
                src="/images/ExternalLink.png" alt="External Link for REST article on the Wikipedia" longdesc="desc/REST.txt" /> Web services. The basic format of an OGDI service call is http://ogdi.cloudapp.net/v1/<i>container</i>/<i>dataset</i>?<i>query</i>,
        where:</p>   
    <ul class="big">
        <li><i>container</i> is the name of the container (for example, "dc" for the District
            of Columbia's data sets).</li>
        <li><i>dataset</i> is the name of the data set (for example, "CrimeIncidents" for the
            Crime Incidents data set in the DC container).</li>
        <li><i>query</i> is your set of query parameters, expressed using a subset of the <a
            href="http://msdn.microsoft.com/en-us/library/cc668784.aspx" target="_blank">ADO.NET
            Data Services query syntax.</a><%-- Section 508 - Added alternate and descriptive text for image--%><img
                src="/images/ExternalLink.png" alt="External Link for ADO.NET Data Services query syntax"
                longdesc="desc/ADOquerysyntax.txt" /></li>
    </ul>
    <p class="big">
        Note that OGDI currently only suppports the $filter and $top query options in the
        ADO.NET Data Services query syntax. Example queries using the Crime Incidents data
        set are available on the <a href="/DataBrowser.aspx?Container=dc&EntitySet=CrimeIncidents">
            Data Browser</a> page of our Interactive SDK.</p>
    <p class="big">
        Also note that if a property has a null value for a particular entity in the data
        set, it will be omitted entirely from the result set returned by OGDI. For example,
        in the Crime Incidents data set, the "method" property is only returned for records
        that have a "method" value in the underlying data set. Your application design should
        take this into account and handle potentially missing properties.</p>
    <h3>
        Data Formats</h3>
        <h4>AtomPub</h4>
    <p class="big">
        By default, OGDI returns data in the <a href="http://odata.org/"
            target="_blank">Open Data Protocol (OData)</a><%-- Section 508 - Added alternate and descriptive text for image--%><img
                src="/images/ExternalLink.png" alt="External Link for Open Data Protocol (OData)"
                longdesc="AtomPBExt.txt" />
        format. This format extends the broadly adopted <a href="http://bitworking.org/projects/atom/rfc5023.html"
            target="_blank">Atom Publishing Protocol</a><%-- Section 508 - Added alternate and descriptive text for image--%><img
                src="/images/ExternalLink.png" alt="External Link for Atom Publishing Protocol"
                longdesc="desc/AtomPB.txt" /> and can be easily consumed by a variety of platforms, including
        Microsoft .NET, Java, Ruby, PHP, and Python. Refer to the code samples on the <a
            href="/DataBrowser.aspx?Container=dc&EntitySet=CrimeIncidents">Data Browser</a>
        page for examples.</p>
        <h4>JSON</h4>
    <p class="big">
        OGDI can also return data in the <a href="http://en.wikipedia.org/wiki/JSON" target="_blank">
            JavaScript Object Notation (JSON)</a><%-- Section 508 - Added alternate and descriptive text for image--%><img
                src="/images/ExternalLink.png" alt="External Link for JavaScript Object Notation"
                longdesc="desc/Json.txt" />
        format, which can be conveniently consumed using JavaScript and other technologies.
        To return data in JSON format, simply append the format=json parameter to your query.
        For example, to retrieve crime incidents in Washington, DC that occured during the
        police department's evening shift in JSON format:</p>
    <p class="big" style="margin-left: 40px">
        <a href="http://ogdi.cloudapp.net/v1/dc/CrimeIncidents?$filter=shift eq 'EVN'&format=json">
            http://ogdi.cloudapp.net/v1/dc/CrimeIncidents?$filter=shift eq 'EVN'&format=json</a>
    </p>
     <h4>
        JSONP</h4>
    <p class="big">
        To mitigate security vulnerabilities associated with cross-site scripting attacks,
        Web browsers generally prevent client-side JavaScript applications originating in
        one network domain (for example, yourdomain.com) from making HTTP requests to other
        network domains (for example, the ogdi.cloudapp.net network domain that hosts the
        OGDI data services). This can prevent JavaScript applications hosted in another
        domain from making straight-forward calls to the OGDI data services, but there a
        variety of techniques that can be used, such as this widely-used <a href="http://softwareas.com/cross-domain-communication-with-iframes"
            target="_blank">IFRAMES-based technique</a><%-- Section 508 - Added alternate and descriptive text for image--%><img
                src="/images/ExternalLink.png" alt="External Link for IFRAMES-based technique"
                longdesc="desc/IFRAMES.txt" />
        described by Michael Mahemoff.</p>
    <p class="big">
        OGDI's data services also provide direct support for the <a href="http://en.wikipedia.org/wiki/JSON#JSONP"
            target="_blank">JSONP</a><%-- Section 508 - Added alternate and descriptive text for image--%><img
                src="/images/ExternalLink.png" alt="External Link for JSONP" longdesc="desc/JSONP.txt" />
        technique. Using this technique, OGDI's data services will call a callback function
        that you specify, passing in the results of your query in JSON format as an input
        format. To use this technique, issue a query with the following additional parameters:
        format=json&callback=<i>yourCallback</i>, where <i>yourCallback</i> is the name
        of a JavaScript callback function defined on the Web page issuing the request.</p>
    <p class="big">
        Refer to the JavaScript sample on the <a href="/DataBrowser.aspx?Container=dc&EntitySet=CrimeIncidents">
            Data Browser</a> page for an example of using JSONP with OGDI. In that sample,
        the AdditionalDataLoaded() function is the JSONP callback function.</p>
    <h4>
        Geospatial Data</h4>
    <p class="big">
        Many of the data sets in OGDI also include geospatial data, which is returned in
        the <a href="http://en.wikipedia.org/wiki/Keyhole_Markup_Language" target="_blank">Keyhole
            Markup Language (KML)</a><%-- Section 508 - Added alternate and descriptive text for image--%><img
                src="/images/ExternalLink.png" alt="External Link for Keyhole Markup Language"
                longdesc="desc/KML.txt" />
        format. This format is compatible with popular desktop and Web-based mapping technologies
        including Microsoft <a href="http://dev.live.com/virtualearth" target="_blank">Virtual
            Earth</a><%-- Section 508 - Added alternate and descriptive text for image--%><img
                src="/images/ExternalLink.png" alt="External Link for Virtual Earth" longdesc="desc/VE.txt" />,
        <a href="http://maps.google.com" target="_blank">Google Maps</a><%-- Section 508 - Added alternate and descriptive text for image--%><img
            src="/images/ExternalLink.png" alt="External Link for Google Maps" longdesc="desc/GoogleMap.txt" />,
        <a href="http://maps.yahoo.com" target="_blank">Yahoo! Maps</a><%-- Section 508 - Added alternate and descriptive text for image--%><img
            src="/images/ExternalLink.png" alt="External Link for Yahoo! Maps" longdesc="desc/YahooMaps.txt" />,
        and <a href="http://earth.google.com" target="_blank">Google Earth</a><%-- Section 508 - Added alternate and descriptive text for image--%><img
            src="/images/ExternalLink.png" alt="External Link for Google Earth" longdesc="desc/GoogleEarth.txt" />.
    </p>
    <p class="big">
        To return geospatial data in KML format, append the format=kml parameter to your
        query. For example, to retrieve geospatial points in KML format for crime incidents
        in DC that occurred during the police department's evening shift:</p>
    <p class="big" style="margin-left: 40px">
        <a href="http://ogdi.cloudapp.net/v1/dc/CrimeIncidents?$filter=shift eq 'EVN'&format=kml">
            http://ogdi.cloudapp.net/v1/dc/CrimeIncidents?$filter=shift eq 'EVN'&format=kml</a></p>
    <p class="big">
        Note that if the data set that you are using does not include any geospatial data,
        a KML query to OGDI will return an empty result set.</p>
    <h3>
        Client Libraries</h3>
    <p class="big">
        Developers using <a href="http://www.microsoft.com/express/" target="_blank">Microsoft
            Visual Studio 2008, Service Pack 1</a><%-- Section 508 - Added alternate and descriptive text for image--%><img
                src="/images/ExternalLink.png" alt="External Link for Microsoft Visual Studio 2008, Service Pack 1"
                longdesc="desc/VS2008.txt" />
        (or later) can use <a href="http://msdn.microsoft.com/en-us/data/bb931106.aspx" target="_blank">
            ADO.NET Data Services</a><%-- Section 508 - Added alternate and descriptive text for image--%><img
                src="/images/ExternalLink.png" alt="External Link for ADO.NET Data Services"
                longdesc="desc/ADOServices.txt" />
        to access data from OGDI through easy-to-use .NET classes.
        Within Visual Studio, this is accomplished by using the <a href="http://msdn.microsoft.com/en-us/data/cc974504.aspx" target="_blank">Add Service Reference</a><img
                src="/images/ExternalLink.png" alt="External Link for a video showing how to consume ADO.NET Data Service in a .NET Application"
                longdesc="AddSvcRef.txt" /> feature (see .NET samples on the <a href="/DataBrowser.aspx?Container=dc&EntitySet=CrimeIncidents">
            Data Browser</a> page).
        To make accessing OGDI data easier, Java developers can use <a href="http://www.interoperabilitybridges.com/projects/restlet-extension-for-adonet-data-services.aspx" target="_blank">Restlet Extension for ADO.NET Data 
        Services</a><img
                src="/images/ExternalLink.png" alt="External Link to Restlet Extension for ADO.NET Data Services"
                longdesc="JavaLib.txt" />.
        PHP developers can take advantage of the Toolkit for <a href="http://www.interoperabilitybridges.com/projects/toolkit-for-php-with-adonet-data-services-.aspx" target="_blank">Toolkit for PHP with ADO.NET Data Services</a><img
                src="/images/ExternalLink.png" alt="External Link to Toolkit for PHP with ADO.NET Data Services"
                longdesc="PHPLib.txt" />.
        </p>
    <h3>
        Paging</h3>
    <p class="big">
        OGDI and the underlying Windows Azure Table Storage service support paging through
        large sets of query results. The documentation for <a href="http://msdn.microsoft.com/en-us/library/dd135718.aspx"
            target="_blank">Query Timeout and Pagination</a><%-- Section 508 - Added alternate and descriptive text for image--%><img
                src="/images/ExternalLink.png" alt="External Link for Query Timeout and Pagination"
                longdesc="desc/QueryTimeoutPagination.txt" />
        in the Windows Azure Table Storage service provides a complete description of how
        OGDI and the underlying Azure platform support paging. You can also refer to the
        "C#/ASP.NET Paging" sample on the <a href="/DataBrowser.aspx?Container=dc&EntitySet=CrimeIncidents">
            Data Browser</a> page, which demonstrates how to perform paged queries using
        the ADO.NET Data Services client library.
    </p>
</asp:Content>
